<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input type="text"  id="one" />
		<select id="select">
			<option value="+">+</option>
			<option value="-">-</option>
			<option value="*">*</option>
			<option value="/">/</option>
		</select>
		<input type="text"  id="two" />=
		<input type="button"  id="three" value="?" style="" onclick="operation();" />
	</body>
	<script type="text/javascript">
		function operation(){
			var onenumber=parseInt(document.getElementById("one").value)
		         alert(onenumber);
			var twonumber=parseInt(document.getElementById("two").value)
			     alert(twonumber);	 
			var calculate=document.getElementById("select").value
			     alert(calculate)
			var result=parseInt(document.getElementById("select").value);
			
			
			switch(calculate){
				case '+':result=onenumber+twonumber;
				break;
				case '-':result=onenumber-twonumber;
				break;
				case '*':result=onenumber*twonumber;
				break;
				case '/':result=onenumber/twonumber;
				break;
				default:alert("错误");
				break;
			}
		}
	</script>
</html>
